home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4872 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.ov.com!news
  2. From: glenn@ov.com (Fletcher.Glenn@ov.com)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: SYSTEM CALL in a while loop didn't work
  5. Date: 7 Feb 1996 16:52:45 GMT
  6. Organization: OpenVision
  7. Message-ID: <4falct$htt@spanky.pls.ov.com>
  8. References: <4f53vi$5uo@bcrkh13.bnr.ca>
  9. Reply-To: glenn@ov.com
  10. NNTP-Posting-Host: foghorn.pls.ov.com
  11.  
  12. In article 5uo@bcrkh13.bnr.ca, coopeng <coopeng@bnr.ca> writes:
  13. >Hi folks,
  14. >I am rubing a 13000 records file in a 3 nested while loop
  15. >eg
  16. >while()
  17. >  while()
  18. >    */first system call */
  19.      ^^
  20. Is this a typo?
  21.  
  22. >    while()/*rubing*/
  23. >      strstr()
  24. >      */second system call */
  25.        ^^
  26. Is this a typo?
  27.  
  28. >
  29. >first system call works, but second doesn't.  If I comment the third while loop then 
  30. >second while loop also works.  I shall be thankful if you guys mail me the 
  31. >solution as soon as possible.
  32. >
  33. >email address : coopeng@bnr.ca
  34. >thanks
  35. >denesh
  36. >
  37.  
  38. Try the following:
  39.  
  40. while() {
  41.   while() {
  42.     /* first system call */
  43.     while() { /*rubing*/
  44.       strstr()
  45.       /* second system call */
  46.     }
  47.   }
  48. }
  49.             
  50.         Fletcher.Glenn@ov.com
  51.  
  52.